package cocurrency.cyclicbarrier;

import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;

/**
 * Created by luzl on 4/6/2017.
 */
public class CyclicBarrierTest {

    public static void main(String[] args){
        CyclicBarrier cyclicBarrier=new CyclicBarrier(10,new TaskThread());
        for(int i=0;i<10;i++){
            RunnerThread thread=new RunnerThread("Seq"+i,cyclicBarrier);
            thread.start();
        }
    }
}
